package com.woniuxy.huayoung.service.impl;

import com.woniuxy.huayoung.entity.Hotel;

import com.woniuxy.huayoung.entity.HotelCity;
import com.woniuxy.huayoung.entity.HotelTheme;
import com.woniuxy.huayoung.entity.Order;
import com.woniuxy.huayoung.mapper.HotelMapper;
import com.woniuxy.huayoung.service.HotelService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class HotelServiceImpl implements HotelService {
    @Resource
    private HotelMapper hotelMapper;


    @Override
    public List<Hotel> findByAddress(String address) {

        return hotelMapper.findByAddress(address);
    }

    @Override
    public Hotel findById(int id) {
        return hotelMapper.findById(id);
    }

    @Override
    public List<HotelTheme> findAllTheme() {

        return hotelMapper.findAllTheme();
    }

    @Override
    public List<HotelCity> findBySpe() {
        return hotelMapper.findBySpe();
    }

    @Override
    public List<Hotel> findByCid(int cid) {
        return hotelMapper.findByCid(cid);
    }

    @Override
    public List<Hotel> findByTid(int tid) {
        return hotelMapper.findByTid(tid);
    }

    @Override
    public void insertHotelOrder(Order order) {
        hotelMapper.insertHotel(order);
    }

    @Override
    public void delByOrder(String orderno) {
        hotelMapper.delByOrder(orderno);
    }


}

